home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 203_01 / yamman.doc < prev    next >
Encoding:
Text File  |  1980-01-01  |  33.8 KB  |  889 lines

  1.                                  User Manual for
  2.                            YAM (Yet Another Modem)
  3.                                by Chuck Forsberg
  4.  
  5.                      (Converted for MS-DOS and Lattice-C)
  6.                                 by Olen Pederson
  7.  
  8.  
  9. 1. Highlights
  10.  
  11.     Conversational mode with optional capture to file and 
  12.     multiple page review of past output.  File capture of long 
  13.     files works with any system which responds to XON-XOFF 
  14.     protocol.
  15.  
  16.     Flexible uploading of suitable files to many types of remote 
  17.     systems, even Bulletin Boards without normal uploading 
  18.     capability.
  19.  
  20.     Error checking file exchange with programs using Ward 
  21.     Christensen's protocol with optional Cyclic Redundancy 
  22.     Check.  Enhanced error recovery and transfer abort logic.
  23.  
  24.     Batch transmission of files with compatible programs.
  25.  
  26.     High speed operation, 9600 baud file transfer and 
  27.     conversational terminal operation.  Buffered printer 
  28.     operation at >>1200 baud.  Full printer buffering allows use 
  29.     of slow printers, or printers with burst transfers (line 
  30.     printer, MX80, etc.).  Function key escape sequences can be 
  31.     buffered, allowing proper operation when keyboard baudrate 
  32.     exceeds host baud rate.
  33.  
  34.     Disk utility functions including directory listing, change 
  35.     disk and/or directory, erase files, disk free space 
  36.     calculation, file transfer time calculation, CRCK file 
  37.     check, and local listing of files.
  38.  
  39.     Full support for pathnames, subdirectorys.
  40.  
  41.     Great flexibility in specifying filenames.  New data may be 
  42.     appended to existing ASCII files.  Optionally, YAM can 
  43.     maintain log of files sent and/or received with disk, 
  44.     filename, baud rate, and the name of the remote system.
  45.  
  46.     Written in C, a modern high level systems language for ease 
  47.     of portability and maintenance.
  48.  
  49. 2. Definitions
  50.  
  51. CAPTURE
  52.     When in the T(term) function, ALL data coming from the remote 
  53.     is captured in a circular buffer.
  54.  
  55. DUMPING
  56.     When a receive file is open as a result of a "t  filename" 
  57.     command, and the circular buffer is nearly full, that data 
  58.     is written out to the receive file if Dumping is on.  
  59.     Setting Squelch mode (see below) turns Dumping off until a 
  60.     ^R character is encountered.
  61.  
  62. FUNCTION
  63.     An operation supported by yam, such as DIR, TYPE, S, R, or 
  64.     T(term).  A command may set or reset a MODE, or perform 0 or 
  65.     more FUNCTIONS.
  66.  
  67. HOST
  68.     The ``other machine'' with which YAM is communicating.  This 
  69.     may be with either a direct RS-232 connection or through a 
  70.     pair of modems.
  71.  
  72. MODE
  73.     Many modes affect the way the term function handles data.
  74.  
  75. OPTION
  76.     Option(s) apply to the S and R commands only.
  77.  
  78. PREFIX
  79.     A letter that prefixes a command to modify its action.
  80.  
  81. REPLOT
  82.     Traditional term (from early days of Tek Graphics) referring 
  83.     to the rapid redisplay of previously calculated 
  84.     information.  In the case of YAM, the data remaining in the 
  85.     capture buffer may be paged and/or searched with the replot 
  86.     function.
  87.  
  88. {}
  89.     Required argument.
  90.  
  91. []
  92.     Optional argument.
  93.  
  94. pattern ...
  95.     An empty pattern represents all files on the default disk in 
  96.     the current working directory.  A disk identifier without 
  97.     filename represents all files on that disk in the current 
  98.     directory.  Unambiguous and ambiguous filenames may be 
  99.     specified in any combination.  A pattern may contain any 
  100.     combination of the above.
  101.  
  102. 3. Prefixes and Commands
  103.  
  104. 3.1 a:
  105.     Change to a: disk (or b, etc.) some versions print the free 
  106.     disk space in kilobytes.
  107.  
  108. 3.2 b m
  109.     Set baudrate to m.  Example: "b 9200"
  110.  
  111. 3.3 br{eak}
  112.     Sends a break.
  113.  
  114. 3.4 bye
  115.     Dump any connection in progress by dropping DTR (data 
  116.     terminal ready).  A call or on command must be given to 
  117.     reassert DTR before making or answering another data call.
  118.  
  119. 3.5 call name
  120.     If the first character of name is a letter, yam searches the 
  121.     PHONES file for name.  If the search is successful, enable 
  122.     Data Terminal Ready (DTR), and set baudrate to the value (if 
  123.     present) corresponding to name.  If autodial is supported, 
  124.     dial the telephone number.  The specifics of autodial 
  125.     operation may vary with the implementation.  If autodial is 
  126.     notsupported, the telephone number is displayed.  It is not 
  127.     necessary to type the entire name as it appears in the file, 
  128.     as YAM will find the first entry that is a prefix of name.  
  129.     If the first character of name is not a letter, yam assumes 
  130.     a telephone number has been entered directly.
  131.  
  132.     Example: "call tcbbs" or "call tc"
  133.  
  134. 3.6 cd pattern ...
  135.     change current directory to pathname.  Function the same as 
  136.     the dos or Unix cd command.
  137.  
  138. 3.7 ch
  139.     change port configuration.  System will prompt for data bits, 
  140.     parity and stop bits.
  141.  
  142. 3.8 chat
  143.     Chat keyboard to keyboard.  Characters typed by either 
  144.     keyboard are echoed to both ends, and RETURNS echo as  
  145.     RETURN/LINEFEED.  Chat will become hostile if the other end 
  146.     also echoes characters.
  147.  
  148. 3.9 close
  149.     Dump capture buffer if a receive file is open, close files.
  150.  
  151. 3.10 crc [pattern ...]
  152.     Print the "crc" checksum and character count for the 
  153.     specified files.  The checksum is calculated with the same 
  154.     alogrithim as the CP/M CHEK.COM program.  This command is 
  155.     slower but possibly more accurate than the crck command.
  156.  
  157. 3.11 crck [pattern ...]
  158.     Print the "crck" checksum and sector count for the specified 
  159.     files.  The "crck" algorithm is stolen from version 4.3 
  160.     CRCK.ASM.
  161.  
  162. 3.12 e{mode[s]}
  163.     Enable mode(s) affecting file transmission/reception with the 
  164.     term function.  (The "s" and "r" commands always send data 
  165.     transparently.)
  166.  
  167.  
  168. 3.13 d{mode[s]}
  169.     Disable mode(s) affecting file transmission/reception with 
  170.     the term function.
  171.  
  172. 3.14 debug
  173.     Cause an interrupt to the operating system for use with 
  174.     debuggers.  The MS-DOS version does an INT 3.  NOTE: the 
  175.     debugger must have previously set up the vector location for 
  176.     this command to function properly.
  177.  
  178. 3.15 del pattern ...
  179.     Delete the named files.  For each matched pathname, the user 
  180.     is prompted for Y, N, or Q.  Y erases the file, N skips to 
  181.     the next file, and Q or anything else aborts the command.
  182.  
  183. 3.16 dir [pattern ...]
  184.     Displays the directory with the number of bytes in each 
  185.     file.  The number of files matched, number of blocks, number 
  186.     of kb allocated to those files, and estimated transmission 
  187.     time at the current baudrate for all files listed are 
  188.     displayed.  Transmission time estimate is based on batch 
  189.     transmission and the formula:
  190.     blocks per minute =
  191.            (Baudrate*60)/(10 bits each char * 136 chars)
  192.     Time does not include error correction.  The usual ambiguous 
  193.     filenames are allowed. Example: "dir" "dir *.c" "dir yam*.c" 
  194.     "dir *.c *.h"
  195.  
  196. 3.17 dump [pattern ...]
  197.     Dump the named files in side by side hex/ascii format.  Zero 
  198.     length files will not be displayed.
  199.  
  200. 3.18 f[mode[s]] name
  201.     Send file 'name' in the term function.  The optional mode 
  202.     enables one or modes.  If squelch is enabled, preface with 
  203.     ^R and append with ^T.
  204.  
  205. 3.19 help
  206.     Displays a command summary.  This command closes any open 
  207.     send file.
  208.  
  209. 3.20 init{ialize}
  210.     Initializes yam to all its default values.  Does not reset 
  211.     the modem or file system(see "reset").
  212.  
  213. 3.21 kill
  214.     Kill all data in the capture buffer.  Restores the pointers 
  215.     to their initial positions.
  216.  
  217. 3.22 mn
  218.     Change data port to (decimal) n.  Example: "m1" The domain of 
  219.     correct port numbers and consequences arising from incorrect 
  220.     port numbers vary with the implementation.
  221.  
  222.  
  223. 3.23 o{ff}
  224.     Disable the modem by turning off DTR.
  225.  
  226. 3.24 pxm
  227.     Set Parameter x to value m.
  228.  
  229. 3.25 pwd
  230.     Print pathname to the current working directory.
  231.  
  232. 3.26 qu
  233.     quit to DOS without dropping DTR to modem.  This allows exit 
  234.     to  the operating system, and subsequent re-entry without 
  235.     causing the  modem to disconnect.
  236.  
  237. 3.27 reset [size]
  238.     Dump the capture buffer; if a file is open, close all files, 
  239.     and reset modem.  The optional argument size becomes the 
  240.     size of the circular capture buffer, useful for debugging.
  241.  
  242. 3.38 replot [m]
  243.     Redisplay the last m lines and/or escape sequences received 
  244.     from the host.  If m is 0 or absent, redisplay starting with 
  245.     the earliest data.  A screenful is displayed at a time.  The 
  246.     commands accepted in replot mode are listed below.
  247.  
  248. 3.39 rewind
  249.     Rewind the buffer pointers for the display, printer, and file 
  250.     dump from the term function.  The effect of this command is 
  251.     the same as if the data had been sent another time.
  252.  
  253. 3.40 r[options] [file ...]
  254.     Receive with options 1 or more files using the Ward 
  255.     Christensen protocol.  If no filename is given, batch mode 
  256.     is assumed.  (Note: batch mode is not compatible with 
  257.     MODEM7).  If more than one filename is given, a single file 
  258.     transfer will be made for each.  If the RESTRICTED option is 
  259.     defined, a file received in error will be unlinked (erased).
  260.  
  261. 3.41 s
  262.     Displays status information about YAM configuration.
  263.  
  264. 3.42 sum pattern ...
  265.     Sums the named source files with an algorithm compatible with 
  266.     sum(1) on Version 7 Unix (sum -r on System III). Carriage 
  267.     returns, and all characters starting with CPMEOF are 
  268.     excluded from the calculation.  This processing allows 
  269.     comparison of source files stored on different systems but 
  270.     not ``binary'' files.
  271.  
  272. 3.43 s[options] pattern ...
  273.     If batch mode is specified with the b option, 0 or more files 
  274.     are 
  275.         sent according to the ambiguous pathname(s).  If batch mode is not 
  276.     specified, the named unambiguous file(s) are sent each in single 
  277.     file mode.
  278.  
  279. 3.44 tab n
  280.     Set tab expansion to n.  If n=0, or not present, the tabs are 
  281.     reset to the default as found in the configuration file.
  282.  
  283. 3.45 type pattern [...]
  284.     Type the file(s) specified by one or more possibly ambiguous  
  285.     pattern(s).  This command closes any open send file.  Yam  
  286.     compiled with USQ defined will automatically detect squeezed 
  287.     files and print them in ASCII.  Type stops/resumes printing with 
  288.     ^S.  Keyboarding ^C cancels, and ^X skips to the next file.
  289.  
  290. 3.46 t[c][mode] [file]
  291.     The term function with optional capture to file.  0 or more modes 
  292.     may be enabled.  The c (close) mode causes data in the capture 
  293.     buffer to be written to file and closed immediately.  View mode 
  294.     causes the term function to display control characters by 
  295.     prefixing ^ to the corresponding letter.  Characters with the 8th 
  296.     bit set will be prefixed by a ~.  If the free buffer space 
  297.     becomes low, yam attempts an xoff-dump-xon sequence.  A receive 
  298.     file previously opened by 't file' will not be closed by a 
  299.     't'command.
  300.  
  301.     Keyboarded characters are treated in either of two ways depending 
  302.     on the value of Exitchar (see parameters, below). If Exitchar is 
  303.     non zero, term will return when a character matching Exitchar is 
  304.     keyboarded, and all others are passed without any special 
  305.     action.  Otherwise, the following subcommands are available:
  306.  
  307. 3.46.1 ^b
  308.     Break.  Sends a break signal to the remote.  The break key on your 
  309.     terminal will probably generate a ^@ (NULL) character.  After the 
  310.     break is sent, any remaining keyboard input (usually garbage from 
  311.     a break character) is discarded.
  312.  
  313. 3.46.2 ^E
  314.     Exits from the term function back to main command level.  Rapidly 
  315.     typing ^E^E will instead cause one ^E to be transmitted.
  316.  
  317. 3.46.4 ^Q
  318.     If a send file is open and its transmission has been stopped by a 
  319.     XOFF, transmission is resumed.  Otherwise no special treatment.
  320.  
  321. 3.47.4 ^S
  322.     If a send file is open and it is being transmitted, transmission 
  323.     is stopped.  Otherwise no special treatment.
  324.  
  325. 3.46.6 ^R
  326.     Replots up to 24 lines starting with either the first character 
  327.     received after the last character keyboarded, or as much as in 
  328.     the buffer if less than 24 lines have been received.  This allows 
  329.     the output from the last command to be conveniently reviewed.  
  330.     Replot then awaits next replot command (see below).  ^R^R typed 
  331.     quickly sends one ^R instead.
  332.  
  333.  
  334.     The following received characters are recognized in the term  
  335.     function, when they are fetched from the circular buffer for the 
  336.     display.
  337.  
  338. 3.46.8 SO
  339.     If Cis02 mode is in effect, turns on the Compuserve A protocol.  
  340.     This protocol is used with the XFTRAN program and the DOW command 
  341.     of SIG/ACCESS.  See yam4.c and Compuserve's CP-MIG user group for 
  342.     more information.
  343.  
  344. 3.46.9 XOFF
  345.     Stops file transmission from yam.
  346.  
  347. 3.46.10 XON
  348.     Resumes file transmission.
  349.  
  350. 3.46.11 TAB
  351.     Some versions of YAM expand tab characters to spaces on the  
  352.     display.  BUG: Since YAM does not decode cursor addressing  
  353.     commands, these commands should not be intermixed with tabs on 
  354.     the same line.
  355.  
  356. 3.47 w
  357.     Write dumps the circular buffer to the receive file, if open.
  358.  
  359. 3.48 wc pattern ...
  360.     Takes a count of lines, words, characters excluding returns, and 
  361.     all text characters for the given files.  Characters beginning 
  362.     with CPMEOF are excluded.  On 8 many versions, counts are modulo 
  363.     64k.
  364.  
  365. 3.49 x
  366.     same as bye.
  367.  
  368. 3.50 ! command
  369.     Create a shell to execute a DOS command.  For this function to work,
  370.     the dos PATH must be set so the file command.com can be found.  For
  371.     Lattice-C versions, SWITCHAR must be not be reset from the default "\".
  372.  
  373. 3.51 ;
  374.     Semicolon is an optional command delimiter which may be used in 
  375.     place of RETURN in order to place multiple commands on a line.
  376.  
  377. 4. MODES used with D, E, F, T or U commands
  378.  
  379.     !
  380.     Negates the sense of the following mode.  For example, t!l will 
  381.     turn off the line printer.
  382.  
  383.     2
  384.     Enables Compuserve A protocol if this feature is included.  N.B.  
  385.     Non-ASCII files or files without CR's must be uploaded in 
  386.     Cpmpuserve's binary mode.
  387.  
  388.     a
  389.     A return from the keyboard is sent as return, linefeed. If half 
  390.     duplex, both are sent to the console.
  391.  
  392.     b
  393.     Binary mode of TRANSMISSION with T function.  All 8 bits are 
  394.     sent.  Handy for downloading binary files to adjacent machines 
  395.     without any modem program.  Don't confuse this with the S 
  396.     function which uses the Christensen protocol.  Also don't confuse 
  397.     with i mode which affects files received with the T function.
  398.  
  399.     d
  400.     Directly enables/disables dumping of captured text is squelch mode 
  401.     is in effect.  If squelch mode is not in effect, always enables 
  402.     dumping.
  403.  
  404.     e
  405.     with term command, echo characters received from the host to the 
  406.     host.  Use this only for keyboard to keyboard communication, and 
  407.     then only at one end. Reset after each command.  Does not imply 
  408.     "Half Duplex".
  409.  
  410.     With the f command, selects an alternate file transmission 
  411.     function sendecho() which waits for an echo to each character 
  412.     transmitted (for Throttle/10 seconds).  The echoed character is 
  413.     output to console. See "propagating yam" below.  Often it is 
  414.     fairly easy to write a simple receive routine which synchronizes 
  415.     with the sender by the simple expedient of echoing the characters 
  416.     received.  On Heath/Zenith CP/M system, the pip device "TTY:" 
  417.     does just that.
  418.  
  419.     f
  420.     Full duplex.
  421.  
  422.     g
  423.     Resumes (GO) sending file once in the term function, equivalent to 
  424.     XON.  Disabling GO causes a file queued for transmission to wait 
  425.     for an XON character.
  426.  
  427.     h
  428.     Half Duplex.  Displays keyboarded characters as they are sent to 
  429.     the host.
  430.  
  431.     i
  432.     Ignrx flag.  When set this will cause characters defined by the 
  433.     RXNONO string to be ignored in the term() mode.  If reset, all
  434.     characterts are passed thru.  This flag may be set or reset by
  435.     the call command based on information in YAMPHONE.T.
  436.  
  437.     k
  438.     Set the buffer size used in the s or r commmands.  Non-compatible  
  439.     with MODEM7.
  440.  
  441.     l
  442.     List unit (Printer) on.  Since the printer is separately buffered, 
  443.     it needn't be as fast as the incoming data as long as the 
  444.     difference doesn't exceed the buffer size.  The rewind command 
  445.     may be used to get extra copies of the received data.
  446.  
  447.     n
  448.     Called nlmode, after the corresponding tty mode in Unix systems.  
  449.     Send NEWLINE (lf) only when transmitting file (no CR).  Send 
  450.     keyboarded CR as NEWLINE.  When receiving a file to disk with the 
  451.     term function, NEWLINE is stored on disk as \\r \\n.
  452.  
  453.     p
  454.     When sending files with the term command, wait to receive GOchar 
  455.     after sending a CR at the end of a line.  The default for GOchar 
  456.     is linefeed (see parameter g below).  If GOchar is not received, 
  457.     the wait times out and transmission proceeds in the same manner 
  458.     as with w mode.  The duration of this timeout is controlled by 
  459.     the p parameter.
  460.  
  461.     r
  462.     Called crmode.  Sends CR only at the end of each transmitted line.
  463.  
  464.     s
  465.     Squelch the dumping of captured data with ^T and unsquelch with 
  466.     ^R.  These characters are not copied to the file.  When a receive 
  467.     file is opened with Squelch mode is selected, writing to the file 
  468.     is turned off. Selecting squelch mode automatically turns writing 
  469.     off; disabling squelch automatically turns it on. (See "d" above).
  470.  
  471.     t
  472.     If Waitnum is more than 1, wait for echoes to stop after sending 
  473.     each Waitnum characters for period Pause.  If Waitnum==1, send at 
  474.     1/Throttle, measured in loops of the term() function.  The 
  475.     default values of Waitnum and Throttle provide transmission at 
  476.     about 50 words per minute regardless of baud rate.  This is handy 
  477.     because many remote systems cannot accept input at full speed.
  478.  
  479.     v
  480.     View control characters as ^C.  Useful in shutting up the bloody 
  481.     bell.  In addition to the above, v distinguishes characters with 
  482.     the parity bit set by prepending a tilde (~).  Note: View mode is 
  483.     distinct from view option.  This mode is reset after each command.
  484.  
  485.     w
  486.     When sending files with the term command, send CR only at end of 
  487.     line, and then pause until echoes from remote have stopped.  
  488.     Useful for sending files to bulletin boards where the remote 
  489.     needs time to prepare for the next text line.  The length of this 
  490.     pause is controlled by the p parameter.
  491.  
  492.     x
  493.     exit from the term function when EOF is encountered on transmitted 
  494.     file.
  495.  
  496.     z
  497.     Close file when ^Z is encountered while dumping the capture 
  498.     buffer.  Otherwise ^Z is ignored.  It should be noted that ``The 
  499.     Source'' coughs up an occasional ^Z just as the "UPI" 
  500.     program is about to output something interesting.
  501.  
  502. 5. Options used with S and R commands
  503.  
  504.     All options are reset after each command.
  505.  
  506.     b
  507.     Batch option.  In receive, filenames are provided by the sender. 
  508.     Pathname(s) may be specified as a batch option for file 
  509.     reception(i.e rb /usr/cat/).  Filenames provided by the sender 
  510.     will be appended to the specified path name.  Disk and 
  511.     subdirectory names are excluded from the transmitted pathname(s).
  512.  
  513.     c
  514.     Request Cyclic Redundancy Check instead of simple checksum.  This 
  515.     option must be specified with the R function.  The receiving 
  516.     program automatically signals the sending program if CRC is to be 
  517.     used.  The probability of an undetected transmission error is 
  518.     much less if CRC is used in place of arithmetic checksum.
  519.  
  520.     k
  521.     Use 1 K byte blocks with the S and R functions.  Default block 
  522.     length is 128.  Increases throughput when the baudrate is high, 
  523.     relative to the response times of the channel and computers.  The 
  524.     k option may not work properly on all systems, especially at high 
  525.     baud rates.
  526.  
  527.     q
  528.     Quiet option inhibits some of the status information.  Unlike some 
  529.     other programs, quiet option is not necessary for proper file 
  530.     file transfer at higher baudrates.
  531.  
  532.     t
  533.     Execute the term function after file transfer(s) complete.
  534.  
  535.     v
  536.     View the data being transmitted.  Correct data is displayed once.  
  537.     Viewing ascii files does not interfere with correct transmission 
  538.     at extreme baud rates, although throughput will be affected.  For 
  539.     each sector, data is viewed once before sending/after receiving.
  540.  
  541.     y
  542.     Yes it is OK to clobber a file already on disk.  If absent, the 
  543.     operator is given a choice of appending to the current file (a), 
  544.     erasing it (y) or aborting (n).
  545.  
  546. 6. Parameters used with P command
  547.  
  548.     gm
  549.     Set GOchar to m (decimal).  Default is linefeed.  (See p mode.) 
  550.     Some remote systems accept uploads with a ? for each line.  
  551.     Optimum operation with such a system might call for pg63 pp10000 
  552.     pt90 ftw filename.  The first sets the go ahead character to 
  553.     question mark, the second sets the timeout to a long delay, 
  554.     the third sets throttle to a speed which allows the remote 
  555.     to echo at 300 baud (assuming no tabs), and finally the 
  556.     command to send the file with throttle and wait at end of 
  557.     line (also eliminating the lf).  If this sounds too 
  558.     complex you can always go back to longhand.
  559.  
  560.     em
  561.     Set Exitchar to m (decimal).  Same format as GOchar discussed 
  562.     above.  If defined (non-zero), term function will return when m 
  563.     is keyboarded, and ALL other keyboarded characters are passed to 
  564.     the remote.  If special function keys have been defined for 
  565.     replot and exit they will still be recognized.  Otherwise, be 
  566.     sure not to set Exitchar to something you can't keyboard!
  567.  
  568.     wn
  569.     Set Waitnum to n.  See "w" mode for details.  Default is 1.
  570.  
  571.     tm
  572.     Set Throttle to m.  The default value corresponds to about 80 
  573.     words per minute sending speed.
  574.  
  575.     pm
  576.     Set Pause to m.  When the free characters in the circular buffer 
  577.     reach LOWATER, an XOFF is sent.  Pause controls the time which 
  578.     must then pass without characters received before believing that 
  579.     the other end really has obeyed the XOFF character, as opposed to 
  580.     the sometimes lengthy Compuserve hitches in the getalong. If 
  581.     Pause is too short, it is possible that a lurch in output will be 
  582.     interpreted as acknowledgement of the XOFF, only to have more 
  583.     characters arrive whilst yam is occupied dumping the buffer to 
  584.     disk.  When this happens, unfortunate characters are routed to 
  585.     the proverbial bit bucket, and you can retry the download as the 
  586.     timesharing service increments the connect charge.  The default 
  587.     value seems suitable for Source over Tymnet and BBS systems.  
  588.     Pause is also the echo wait period used with the w mode, as well 
  589.     as the timeout for p mode. Some bulletin board programs require a 
  590.     very long pause when accepting files with the p or w mode.
  591.  
  592. 7. Replot Commands
  593.  
  594.     Commands within replot consist of a single character. Replot maps 
  595.     uppercase, lowercase, and control characters together in decoding 
  596.     commands.
  597.  
  598.     b
  599.     Display beginning of buffer.
  600.  
  601.     k
  602.     Kill entire buffer contents and return.
  603.  
  604.     r,BS
  605.     Display previous page (some overlap is provided).
  606.  
  607.  
  608.     SP
  609.     Display the next page.
  610.  
  611.     /
  612.     Accept a search string, terminated by return.  Search through the 
  613.     buffer starting at the current location for the first (next) 
  614.     instance of that string (matches either case).  Display page 
  615.     starts with that line.  If the search is unsuccessful, ring bell 
  616.     and jump to the beginning of the buffer.
  617.  
  618.     n
  619.     Search for next occurrence of the previously entered search string.
  620.  
  621.     p
  622.     Backup one line and redisplay.
  623.  
  624.     LF
  625.     Advance one line.
  626.  
  627.     x
  628.     Exit after displaying the last page of buffer contents. This 
  629.     restores the screen and keyboard to the same state they were in 
  630.     before replot was entered.  X allows you to see where you were if 
  631.     you were in the midst of keyboarding a command to the remote.  
  632.     For example, suppose you are typing in a line of commands and you 
  633.     need to "thumb back" through the remote's output for some vital 
  634.     nugget of information.  (After you enter a 20 line email message, 
  635.     NOW Compuserve asks you for the 8 digit account number to mail it 
  636.     to!) So you hit some Control V's until you see it on the screen.  
  637.     Now you can't remember whether you typed a space after the last 
  638.     part of you command to the remote.  No sweat, just exit replot 
  639.     with x and you'll see just where you were (But don't forget that 
  640.     number!) X may not redisplay the entire page contents if the host 
  641.     has been sending escape sequences in the last page.
  642.  
  643. 8. Special files
  644.  
  645.     There are 3 special files used with YAM.  Actual file names are 
  646.     defined in YAMSYS.H with the defaults being "YAMCFG.T", 
  647.     "YAMHELP.T" and "YAMPHONE.T".  YAM will search all directorys in 
  648.     the default search path to find these files.  The data from the 
  649.     first sucessful pathname search is used. 
  650.  
  651. YAMCFG.T
  652.     This file is the startup configuration file.  It contains the 
  653.     signon prompt,  initial serial port definition, definition of the 
  654.     RXNONO string, xon-xoff parameters, and others depending on the 
  655.     implementation. 
  656.  
  657. YAMHELP.T
  658.     This file contains a summary of commands and is displayed by the 
  659.     "h[elp]" command.
  660.  
  661. YAMPHONE.T
  662.     This is the phone list file used by the CALL command.   Call 
  663.     searches each line of this file until it finds a match.  It then 
  664.     configures the modem port as defined by the parameters following 
  665.     the phone number.  The phone number must be delimted by a <TAB> 
  666.     character.  Modem baud rate is defined by a lower case 'b' 
  667.     followed by a number.  Several letters following the baud rate 
  668.     define the number of stop bits(S1, S2), parity none, even or 
  669.     odd(PN,PE,PO), and the number of data bits(D7,D8). The flags 
  670.     field define optional flags which may be turned on. At the time 
  671.     of this writing only the Igrnx flag is defined.  This will set or 
  672.     reset the i flag as defined in the "ei" command.
  673.  
  674.  
  675. 9. Sample YAM Session
  676.  
  677.     A sample session on MS-DOS might be:
  678.     
  679.     C>YAM            invoke yam
  680.     b 9200;b:        Set 9.6 kb, Change to b disk
  681.     dir yam*.*        List files and calculate xmsn time
  682.     sb yam*.*        Send them to a system supporting the
  683.                 YAM batch mode
  684.     call hydepark        Call the number found in phonelist
  685.     user data        Enter a message, etc.
  686.     ^E            exit from term mode
  687.  
  688.     ftp letter        Open 'letter' and send to bbs, using prompt 
  689.                 and throttle modes to slow transmission so 
  690.                 the remote system won't drop characters.  YAM 
  691.                 remains in T(erm) after the file is sent.
  692.     xmodem s foo.bqr    Command host to download a file
  693.  
  694.     ^E
  695.     rt secret.tqp        Download the file using MODEM7 protocol, then 
  696.                 back to term function
  697.  
  698.     dir            command to list directory on remote system
  699.     ^R pause ^R        Flip back two pages to first part of directory 
  700.                 listed previously
  701.     CR            Back to term function
  702.     user data        More keyboarding with remote, logoff
  703.     ^E            exit (if CDO defined, term will exit by itself)
  704.     bye            Drop DTR so modem won't answer calls, Return 
  705.                 to DOS
  706.  
  707. 10. Notes
  708.  
  709.     When operating with a timesharing system and/or through network or 
  710.     satellite links, considerable delays in transmission and responce 
  711.     to blocks may severely reduce throughput of an FTP (file transfer 
  712.     protocol).  The k option causes the s command to use 1024 byte 
  713.     blocks, rather than the standard 128.  At high baud rates, this 
  714.     reduces the protocol related overhead up to 87 per cent, 
  715.     depending on file length, by reducing the number of blocks which
  716.     must be sent and acknowledged by a factor of 8.  1024 byte 
  717.     blocks are selected by the sender.  An STX at the 
  718.     beginning of each block (otherwise SOH for 128 bytes) 
  719.     indicates this block is 1k long.  Pathnames are always 
  720.     sent with 128 byte blocks. Buffering problems on some 
  721.     timesharing systems may mitigate against use of 1k blocks 
  722.     at high baudrates.  Files transmitted from Unix to CP/M 
  723.     will be padded with ^Z characters as necessary to reach a 
  724.     length divisable by 128.
  725.  
  726.     CP/M files sent with 1k blocks may not compare identically with 
  727.     their originals due to the addition of up to seven extra 128 byte 
  728.     sectors (padded with CPMEOF).
  729.  
  730.     Readiness to receive sectors with Cyclic Redundancy Check (2  
  731.     bytes) instead of the usual additive checksum is indicated by a 
  732.     0103 (ASCII "C") for initial "naks" instead of 025. CRC option is 
  733.     highly recommended.  It is the default when using batch mode 
  734.     and/or 1k blocks.
  735.  
  736.     File transmission is compatible with MODEM7 in single file,  
  737.     standard block length mode.  File transmission may be aborted by 
  738.     sending a SEQUENCE of CAN (^X) characters.  Each character 
  739.     keyboarded will cause readline() to return a TIMEOUT error, thus 
  740.     regaining keyboard control relatively easily.
  741.  
  742.     Maximum baudrate possible without errors using the t(erm)  
  743.     function depends on the computer and particular yam  
  744.     implementation, but usually is 9600 baud.
  745.  
  746.     Use these numbers for comparison.  Your mileage and range may 
  747.     differ depending on clock speed, circuit distance and RFI/EMI.  
  748.     California estimate lower.
  749.  
  750.     Quiet mode is not necessary for proper operation at 19kb,  
  751.     although it does increase throughput slightly.  View option (S 
  752.     and R commands) does not decrease maximum baud rate, although 
  753.     throughput is obviously affected according to the ratio of 
  754.     terminal speed to communications rate.
  755.  
  756.     Printer operation with bios calls or view mode substantially  
  757.     reduces the highest baudrate possible with the term function  
  758.     without losing characters (independent of actual printer speed).  
  759.     The term function will send XOFF to prevent buffer overflow if 
  760.     the printer is on, or if a receive file is in use.
  761.  
  762.     In the term function, use of the circular buffer provides some 
  763.     advantages.
  764.  
  765.     Incoming data may come in at a rate higher than the display and/or 
  766.     printer.  Tab expansion for the display does not compromise this 
  767.     ability.
  768.  
  769.     The user may decide to save a timesharing session on the disk 
  770.     AFTER it has started (or possibly even finished) as long as 
  771.     the buffer pointers have not wrapped around.
  772.  
  773.     The same ability also applies to the printer.  The printer need 
  774.     not be as fast as the host as long as the Tortoise is allowed to 
  775.     catch up.
  776.  
  777.     Received data may be redisplayed (replot command).
  778.  
  779.     At high speeds, the display will fall behind the incoming data, as 
  780.     storing of raw host data into the buffer takes precedence over 
  781.     all else.  As a result, a defective or incorrectly programmed 
  782.     port which sources data at high speed can lockout the keyboard.  
  783.     If yam "goes away" when entering the term function, this may be 
  784.     the cause.
  785.  
  786.     The t and z modes affecting dumping of captured data take effect 
  787.     when the circular buffer is written to the receive file, not as 
  788.     the characters are first received from the data port.
  789.  
  790.     The append option (available if receiving filename where filename 
  791.     exists) operates by by utilizing the append option of the C open 
  792.     command.
  793.  
  794. 11. Downloading Files from Unix(TM) Systems
  795.  
  796.     To download files from Unix systems with sb, invoke sb(1) to send 
  797.     the desired files and then use the yam ``r[yt]'' command.  On 
  798.     Unix type:
  799.  
  800.     sb file ...
  801.  
  802.     Then exit term with ^E and give
  803.  
  804.     ry
  805.  
  806.     and file transfers will commence.
  807.  
  808.     If the files are long, and/or if the baudrate is limited, you can 
  809.     save time by squeezing them first with sq(1).
  810.  
  811.     Versions of the BDS C programs SQ, TYPE, and USQ are available for 
  812.     Unix systems.  The CP/M version of USQ supports a -n option which 
  813.     will expand Unix NL's to CR/LF. The Unix version -n flag 
  814.     suppresses carriage returns.
  815.  
  816.     If a file or set of files are to be transported between Unix  
  817.     systems with yam, it is helpful to place them in a tar(1) archive 
  818.     (and possibly squeeze the archive) before transmission.  This 
  819.     procedure will preserve the modification times and avoid adding 
  820.     ^Z characters to the ends of files.  The -k option of sb will 
  821.     select 1 kb block length rather than the standard 128 bytes for 
  822.     improved throughput at high baudrates.  Currently this does not 
  823.     work at 9600 baud with the Z100 under MSB.
  824.  
  825.     Consult the sb.1 manual entry for more information.
  826.  
  827. 12. Uploading Files to Unix(TM) Systems
  828.  
  829.     On Unix systems, files may be uploaded with rb(1). See the rb.1 
  830.     manual entry for more information.
  831.  
  832. 13. Error Correcting File Transfer with Other(UGH) Remote Systems
  833.  
  834.     If the host system has YAM, XYAM, MODEM, XMODEM, tmodem, umodem, 
  835.     or something compatible, you can upload files with the s command 
  836.     on your computer and the corresponding r command on the remote.  
  837.     Newer versions of some of these programs support Cyclic 
  838.     Redundancy Check as an alternative to the simple checksum used by 
  839.     the original Ward Christensen protocol.  CRC is much better at 
  840.     detecting errors and I recommend its use where available.
  841.  
  842.     Unfortunately, this protocol is not implemented on the popular 
  843.     timesharing services The Source and Compuserve.  It is often 
  844.     possible to upload files using the F command, perhaps with one or 
  845.     more modes.  Your chances of success improve if you set "enab 
  846.     flow" when connecting to Telenet. If using Tymnet, type ^R^X just 
  847.     before the host computer name to enable flow control with XOFF 
  848.     and XON.  It often helps to use "half duplex" when connecting to 
  849.     the computer.
  850.  
  851.     Yam4 implements the Compuserve `A' protocol which is usable only 
  852.     on Compuserve's own network.
  853.  
  854.     The determined hacker will divine alternative ways to transfer 
  855.     files by a close examination of the rest of this document.
  856.  
  857. 14. BUGS
  858.  
  859.     Yam does not trap any escape sequences from the computer which can 
  860.     lock up the keyboard or display.  If yam appears to be locked up, 
  861.     check the terminal by itself to see if perhaps it is wedged.
  862.  
  863.     Not all commands are implemented on all versions.
  864.  
  865.     When YAM is used with a terminal (or terminal emulation) which 
  866.     accepts commands to transmit information to the host (screen 
  867.     dump, cursor position, indent, etc.), the characters so generated 
  868.     may cause YAM to do strange things.  The most common 
  869.     manifestation of this is in replot mode, where the automatically 
  870.     generated characters may cause YAM to exit replot.
  871.  
  872.     Yam gets its input in term() mode from low level bios functions.
  873.     This was done for speed but has the side effect of disableing many
  874.     keyboard re-definition utilities.
  875.  
  876.     readbaud() must return a valid #.  Otherwise baudrate will be 0 
  877.     and routines which use it(especially dir) will fail with a divide 
  878.     by 0 error.
  879.  
  880.     sb *.* will report an error when it encounters a subdirectory.  It 
  881.     recovers and the error message can be ignored.
  882.  
  883.     rb pathname may send a pathname NAK to the other system before it 
  884.     is ready, depending on the speed of the host.  This is especially 
  885.     true when using a ram disk to receive files.
  886.  
  887.     break on control-c may not be recognized properly if DOS BREAK
  888.     ON is set.
  889.